//
//  BalanceBuleManager.h
//  BalanceCar
//
//  Created by 郑信鸿 on 2017/8/30.
//  Copyright © 2017年 郑信鸿. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreBluetooth/CoreBluetooth.h>

static NSString *const kCentralManagerStateUpdateNotification = @"CentralManagerStateUpdateNotification";

static NSString *const KCentralManageDiscoverPeripheralNotification = @"CentralManageDiscoverPeripheralNotification";

static NSString *const kPeripheralConentResultNotification = @"PeripheralConentResultNotification";

static NSString *const kPeripheralDisConnectNotification = @"PeripheralDisConnectNotification";

static NSString *const kPeripheraDidReadDataNotification = @"PeripheraDidReadDataNotification";

static NSString *const kPeripheraServiceUUID = @"PeripheraServiceUUID";

typedef void(^WriteDataResultBlock)(NSError *error);

@interface BalanceBuleManager : NSObject

+ (BalanceBuleManager *)shareManager;

@property (strong, nonatomic)CBPeripheral *connectPeripheral;//连接的设备

- (void)scanPeripherals;

- (void)stopScan;

- (void)conentPeripherals:(CBPeripheral *)peripherals;

- (void)cancePeripherals;

- (void)peripheralWriteData:(NSData *)data;

- (BOOL)autoConnectPeripherals;

//缓存连接设备
- (void)savePeripheraServiceUUID:(NSString *)serviceUUID;

- (NSString *)cacheSrviceUUID;


@end
